﻿using System;

namespace MessagePack.Formatters
{
	// Token: 0x02000051 RID: 81
	public class DateTimeFormatter : IMessagePackFormatter<DateTime>
	{
		// Token: 0x06000133 RID: 307 RVA: 0x00004E17 File Offset: 0x00003217
		private DateTimeFormatter()
		{
		}

		// Token: 0x06000134 RID: 308 RVA: 0x00004E1F File Offset: 0x0000321F
		public int Serialize(ref byte[] bytes, int offset, DateTime value, IFormatterResolver formatterResolver)
		{
			return MessagePackBinary.WriteDateTime(ref bytes, offset, value);
		}

		// Token: 0x06000135 RID: 309 RVA: 0x00004E29 File Offset: 0x00003229
		public DateTime Deserialize(byte[] bytes, int offset, IFormatterResolver formatterResolver, out int readSize)
		{
			return MessagePackBinary.ReadDateTime(bytes, offset, out readSize);
		}

		// Token: 0x04000045 RID: 69
		public static readonly DateTimeFormatter Instance = new DateTimeFormatter();
	}
}
